<input type="hidden" value="<?php echo base_url()?>" id="base_url" />
<input type="hidden" value="<?php echo $this->session->userdata('user_id'); ?>" id="user_id" />
<div class="main col2-left-layout">
        <div class="col-main"> 
          <!--Category Title-->
          <div class="page-title category-title">
            <h1>Womens</h1>
          </div>
          <!--Category Image-->         
          <div class="category-products"> 
            <!--Start toolbar-->
            <div class="toolbar">                           
                <?php echo $list_link; ?>                
            </div>
            <!--End toolbar--> 
            
            <!--Start Category Product List-->
            <ol id="products-list" class="products-list">
                <?php foreach($list_res as $res){ 
                    // check restaurent in wishlist
                    $user_id = $this->session->userdata('user_id');
                    $restaurent = new Restaurent();                       
                    $restaurent->where('id',$res->id);    
                    $restaurent->include_related('term_taxonomy',array('term_id','taxonomy'))
                            ->where_related('term_taxonomy', 'taxonomy', 'wishlistrestaurent')
                            ->where_related('term_taxonomy', 'user_id', $user_id);                  
                    $count_restaurent = $restaurent->count();  
                    
                    if ($count_restaurent>0) $check_like = true; else $check_like = false;  
                 ?>
                <li class="item odd">
                    <a class="restaurent_image" title="" href="<?php echo base_url().'restaurents/restaurents/detail/'.$res->id ?>">
                        <img width="135" height="135" alt="" src="<?php echo $res->image; ?>">
                    </a>
                    <div class="product-shop">
                        <div class="f-fix">
                            <h2 class="restaurent_name">
                                <a title="" href="<?php echo base_url().'restaurents/restaurents/detail/'.$res->id ?>"><?php echo $this->common->get_lang($res->name); ?></a>
                            </h2>
                            <div class="restaurent_address">
                                <?php echo $this->common->get_lang($res->address); ?>
                            </div>                       
                            <div class="restaurent_time">
                                Giờ mở cửa: 8h00-20h00
                            </div>
                            <div class="restaurent_description">
                                <?php echo $res->description; ?>
                            </div>
                            <div id="wishlist<?php echo $res->id; ?>" class="link-wishlist">
                                <?php 
                                        if($check_login==false)
                                        {
                                ?>
                                        <a class="link_login_like" href="#">Yêu thích</a>
                                <?php
                                        }
                                        else 
                                        {
                                        if($check_like==false)
                                        {
                                ?>
                                        <a class="add_restaurent_wishlist" value="<?php echo $res->id; ?>" href="<?php echo base_url();?>">Add to wishlist</a>
                                <?php 
                                        }else{                    	
                                ?>
                                        <a class="remove_restaurent_wishlist" value="<?php echo $res->id; ?>" href="<?php echo base_url();?>">Remove Wishlist</a>
                                <?php }}?>                    	
                            </div>
                                                         
                        </div>
                    </div>
                </li>
                <?php } ?>
            </ol>
                       
            <!--End Category Product List--> 
            
            <!--Start toolbar bottom-->
            <div class="toolbar-bottom">
              <div class="toolbar">                
                <?php echo $list_link; ?>
              </div>
            </div>
            <!--End toolbar bottom--> 
          </div>
        </div>
        <div class="col-left sidebar"> 
          <!--Start Magic Category Block-->
          <div class="magicat-container">
            <div class="block">
              <div class="block-title cat_heading"> <strong><span>Womens</span></strong> </div>
              <ul id="magicat">
                <li class="first level0-inactive level0 inactive"><span class="magicat-cat"><a href="#"><span>Sweaters</span></a></span> </li>
                <li class="level0-inactive level0 inactive"><span class="magicat-cat"><a href="#"><span>Knit Tops</span></a></span> </li>
                <li class="level0-inactive level0 inactive"><span class="magicat-cat"><a href="#"><span>Shirts &amp; Blouses</span></a></span> </li>
                <li class="level0-inactive level0 inactive"><span class="magicat-cat"><a href="#"><span>Tee Shirts</span></a></span> </li>
                <li class="last level0-inactive level0 inactive"><span class="magicat-cat"><a href="#"><span>Outerwear &amp; Jackets</span></a></span></li>
              </ul>
            </div>
          </div>
          <!--End Magic Category Block--> 
          
          <!--Start Layered nav-->
          <div class="block block-layered-nav">
            <div class="block-title"> <strong><span>Shop By</span></strong> </div>
            <div class="block-content">
              <div id="narrow-by-list">
                <div>
                  <div class="last collapse" id="filter_heading">Price</div>
                  <div class="last odd" id="filter_content">
                    <ul>
                      <li> <a href="#"><span class="price">$0.00</span> - <span class="price">$1,000.00</span></a> (2) </li>
                      <li> <a href="#"><span class="price">$2,000.00</span> - <span class="price">$3,000.00</span></a> (9) </li>
                    </ul>
                  </div>
                  <script type="text/javascript">
						jQuery('#filter_heading').click(function() {
					      jQuery('#filter_content').slideToggle('slow');
						   jQuery(this).toggleClass("highlight");
					    });
					</script> 
                </div>
              </div>
            </div>
          </div>
          <!--End Layered nav--> 
          
          <!--Start Compare Products-->
          <div class="block block-list block-compare">
            <div class="block-title"><strong><span>Compare Products</span></strong> </div>
            <div class="block-content">
              <p class="empty">You have no items to compare.</p>
            </div>
          </div>
          <!--End Compare Products--> 
          
          <!--Start Poll-->
          <div class="block block-poll">
            <div class="block-title"> <strong><span>Community Poll</span></strong> </div>
            <form action="">
              <div class="block-content">
                <p class="block-subtitle">What is your favorite Magento feature?</p>
                <ul id="poll-answers">
                  <li class="odd">
                    <input name="vote" class="radio poll_vote" id="vote_5" value="5" type="radio"/>
                    <span class="label">
                    <label for="vote_5">Layered Navigation</label>
                    </span> </li>
                  <li class="even">
                    <input name="vote" class="radio poll_vote" id="vote_6" value="6" type="radio"/>
                    <span class="label">
                    <label for="vote_6">Price Rules</label>
                    </span> </li>
                  <li class="odd">
                    <input name="vote" class="radio poll_vote" id="vote_7" value="7" type="radio"/>
                    <span class="label">
                    <label for="vote_7">Category Management</label>
                    </span> </li>
                  <li class="last even">
                    <input name="vote" class="radio poll_vote" id="vote_8" value="8" type="radio"/>
                    <span class="label">
                    <label for="vote_8">Compare Products</label>
                    </span> </li>
                </ul>
                <div class="actions">
                  <button type="submit" title="Vote" class="button"><span><span>Vote</span></span></button>
                </div>
              </div>
            </form>
          </div>
          <!--End Poll--> 
        </div>
      </div>
      <div style="display: none;" id="back-top"> <a href="#"><img alt="" src="images/backtop.gif"/></a> </div>